home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Interactive Reference Guide / C-C++ Interactive Reference Guide.iso / c_ref / csource5 / 349_01 / sss.arc / EX_0206.BAS < prev    next >
Encoding:
BASIC Source File  |  1991-04-09  |  525 b   |  28 lines

  1. ' Program EX_0206.BAS
  2. ' Listing 2B - see documentation in TUTOR.SSS
  3.  
  4. declare function rnx (m, s)
  5.  
  6. rem $include: 'SSSB.H'
  7.  
  8.   title$ = "Start of call is at "
  9.   pt = rnx(7, 4)
  10.   do
  11.     print using "&#####.##"; title$; pt;
  12.     if RA < .25 then
  13.       pt = pt + ER(2, 2)
  14.     else
  15.       pt = pt + TR(1, 3, 4)
  16.     end if
  17.     print using "&#####.##"; " ends at "; pt
  18.     pt = pt + rnx(7, 4)
  19.   loop while (pt <= 120)
  20.  
  21. function rnx (m, s)
  22.   do
  23.     x = RN(m, s)
  24.   loop while x <= 0!
  25.   rnx = x
  26. end function
  27.  
  28.